package com.zoe.onelink.business.exception;

/**
 * <p>标题: </p>
 * <p>描述: </p>
 * <p>版权: Copyright (c) 2018</p>
 * <p>公司: 智业软件股份有限公司</p>
 *
 * @version: 1.0
 * @author: YT
 * @date 2018/6/7
 */
public class Hl7Exception extends RuntimeException {

    public static final String TYPE_COMMON = "common";
    public static final String TYPE_V3 = "v3";

    private String error;
    private String type;

    public Hl7Exception(String error, String type) {
        this.error = error;
        this.type = type;
    }

    public static Hl7Exception common(String error) {
        return new Hl7Exception(error, TYPE_COMMON);
    }

    public static Hl7Exception v3(String error) {
        return new Hl7Exception(error, TYPE_V3);
    }

    public String getError() {
        return error;
    }

    public String getType() {
        return type;
    }
}
